{extend name="admin@public:base" /}
{block name="main-row-content"}
<link rel="stylesheet" href="__STATIC__/admin/css/bootstrap-duallistbox.css" />
<link rel="stylesheet" href="__STATIC__/admin/css/bootstrap-multiselect.css" />
<div class="page-header">
	<h3 class="widget-title grey lighter">
		<i class="ace-icon fa fa-leaf green"></i>
		系统设置
	</h3>
</div><!-- /.page-header -->
<div class="row">
    <div class="builder-tabs builder-form-tabs mb-20">
        <ul class="nav nav-tabs">
           <li class=""><a href="{:url('admin/sys/sys_basic_set')}">基本</a></li>
            <li class=""><a href="{:url('admin/sys/sys_basic_sys')}">系统</a></li>
            <li class=""><a href="{:url('admin/sys/sys_upload_set')}">上传</a></li>
            <li class="active"><a href="{:url('admin/sys/sys_basic_weblog')}">日志</a></li>
            <li class=""><a href="{:url('admin/sys/sys_basic_database')}">数据库</a></li>
       </ul>
    </div>
	<div class="col-xs-12 padding-top-30">
		<!-- PAGE CONTENT BEGINS -->
		<form class="form-horizontal ajaxForm2" action="{:url('admin/Sys/web_log_runset')}" method="post">
		   <div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否开启行为日志：  </label>
				<div class="col-sm-10">
					<label>
						<input name="status" type="radio" value="1" {$web_log_set['web_log_on'] ?"checked":""} class="ace">
						<span class="lbl"> 开启 </span>&nbsp;&nbsp;
					</label>
					<label>
						<input name="status" type="radio" value="0" {$web_log_set['web_log_on'] ?"":"checked"} class="ace">
						<span class="lbl"> 关闭 </span>
					</label>
				</div>
			</div>
            <div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">记录行为日志类型：</label>
				<div class="col-sm-10">
				    <select id="food" class="multiselect" name="web_log_request[]" multiple="">
						<option value="GET" {if condition="in_array('GET',$web_log_set['web_log_request'])"} selected {/if}>GET</option>
						<option value="POST" {if condition="in_array('POST',$web_log_set['web_log_request'])"} selected {/if}>POST</option>
						<option value="AJAX" {if condition="in_array('AJAX',$web_log_set['web_log_request'])"} selected {/if}>AJAX</option>
					</select>
				</div>
				
			</div>
			<div class="space-4"></div>
            <div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1"><span class="middle red">*</span>记录行为日志的方法：</label>
				<div class="col-sm-10">
					<select multiple="multiple" size="15" name="web_log_controller[]" id="duallist">
					{foreach name="menu" item="vo"}
					<option value="{$vo.name}"  {if condition="in_array($vo.name,$web_log_set['web_log_controller'])"} selected {/if}>{$vo.left}{$vo.name}</option>
					{/foreach}
					</select>
				</div>
			</div>
            <div class="space-4"></div>
			<div class="clearfix">
				<div class="col-md-offset-3 col-md-9 ">
					<button class="btn btn-info btn-sm btn-radius" type="submit">
						<i class="ace-icon fa fa-check bigger-110"></i>
						提交并保存
					</button>

					&nbsp; &nbsp; &nbsp;
					<button class="btn btn-success btn-sm btn-radius" type="submit">
						<i class="ace-icon fa fa-undo bigger-110"></i>
						重置
					</button>
				</div>
			</div>

			
		</form>
	</div><!-- /.col -->
</div><!-- /.row -->
{/block}
{block name="script"}
<script src="__STATIC__/admin/js/bootstrap-multiselect.js"></script>
<script src="__STATIC__/admin/js/jquery.bootstrap-duallistbox.js"></script>
<script type="text/javascript">
$('.multiselect').multiselect({
 enableFiltering: true,
 buttonClass: 'btn btn-white btn-primary',
 templates: {
	button: '<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"></button>',
	ul: '<ul class="multiselect-container dropdown-menu"></ul>',
	filter: '<li class="multiselect-item filter"><div class="input-group"><span class="input-group-addon"><i class="fa fa-search"></i></span><input class="form-control multiselect-search" type="text"></div></li>',
	filterClearBtn: '<span class="input-group-btn"><button class="btn btn-default btn-white btn-grey multiselect-clear-filter" type="button"><i class="fa fa-times-circle red2"></i></button></span>',
	li: '<li><a href="javascript:void(0);"><label></label></a></li>',
	divider: '<li class="multiselect-item divider"></li>',
	liGroup: '<li class="multiselect-item group"><label class="multiselect-group"></label></li>'
 }
});
var demo1 = $('select[name="web_log_controller[]"]').bootstrapDualListbox({infoTextFiltered: '<span class="label label-purple label-lg">Filtered</span>'});
</script>
{/block}
